﻿using Cl.Entity.BaseEntity;
using Cl.Utils.Primitives.Enum;
using SqlSugar;
using System.ComponentModel.DataAnnotations.Schema;

namespace Cl.Entity.DataBaseEntity.User
{
    [SugarTable("User_Role")]
    public class Role : EntityBaseComplete
    {
        /// <summary>
        /// 父级Id
        /// </summary>
        public int? ParentId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>

        public string Name { get; set; }

        /// <summary>
        /// 编码
        /// </summary>

        public string Code { get; set; }

        public RoleType Type { get; set; }

        public DataScope DataScope { get; set; } = DataScope.All;

        [SugarColumn(ColumnDataType = "Nvarchar(200)")]
        public string Description { get; set; }

        /// <summary>
        /// 隐藏
        /// </summary>
        public bool Hidden { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
    }
}
